from cProfile import label
from django import forms
from django_quill.fields import QuillFormField

class RangeNumberInput(forms.FloatField):
    widget = forms.NumberInput(attrs={'class':'custom-range col-md-6', 'type':'range', 'min':0, 'max':10, 'step':0.5})

class EditorForm(forms.Form):
	intro = QuillFormField(label='介绍一下你的老师')
	last_year = forms.IntegerField(label="从几年级开始教我们", widget=forms.NumberInput(attrs={'class':'form-control'}))
	host_year = forms.IntegerField(label="教到了几年级", widget=forms.NumberInput(attrs={'class':'form-control'}))
	subject = forms.CharField(label="教哪一科", max_length=20, widget=forms.TextInput(attrs={'class':'form-control'}))
	name = forms.CharField(label="他的名字", max_length=20, widget=forms.TextInput(attrs={'class':'form-control'}))

class CommentForm(forms.Form):
    iq = RangeNumberInput(max_value=10, label='Ta的智商（满分10分）')
    eq = RangeNumberInput(max_value=10, label='Ta的情商（满分10分）')
    practice = RangeNumberInput(max_value=10, label='Ta的教学水平（满分10分）')
    comment = forms.CharField(widget=forms.Textarea(attrs={'class':'form-control'}), label='具体说说')